package com.newbee.sustainability.web.service;

import com.newbee.sustainability.web.config.UserBusinessFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.Map;

@FeignClient(name = "user-business",fallbackFactory = UserBusinessFeignClientFallbackFactory.class)
public interface IUserBusinessFegnCilent {
    @RequestMapping(method = RequestMethod.GET, value = "/user")
    String info();

    @RequestMapping(method = RequestMethod.POST, value = "/user")
    String save(Map<String, String> user);

    @RequestMapping(value = "/user/getUser/{id}", method = RequestMethod.GET)
    String getUser(@PathVariable("id") String id);

}
